import { onMounted, ref } from 'vue'

import { getRecommend as getRecommendApi } from '@/api'

export default function () {


    let albums = ref([])
    let sliders = ref([])

    function getRecommend() {
        getRecommendApi().then((res) => {

            albums.value = res.result.albums
            sliders.value = res.result.sliders
        })
    }

    onMounted(() => {
        getRecommend()
    })

    return {
        albums,
        sliders
    }

}